package com.ndk.ffmpeg;

import java.io.File;

import android.app.Activity;
import android.os.Bundle;
import android.os.Environment;
import android.util.Log;
import android.view.View;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
    }
    
    public void video_decode(View v){
    	String input = Environment.getExternalStorageDirectory().getAbsolutePath().toString()+File.separator+"ffmpeg/video.mp4";
		String output = Environment.getExternalStorageDirectory().getAbsolutePath().toString()+File.separator+"ffmpeg/video_decode.yuv";
		FfmpegUtil.videoDecode(input, output);
	}
    
    public void video_encode(View v){}
    
    public void audio_decode(View v){
    	String input = Environment.getExternalStorageDirectory().getAbsolutePath().toString()+File.separator+"ffmpeg/audio.mp3";
		String output = Environment.getExternalStorageDirectory().getAbsolutePath().toString()+File.separator+"ffmpeg/audio_decode.pcm";
		FfmpegUtil.audioDecode(input, output);
    }
    
    public void audio_encode(View v){}
}
